<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Term::UI - Term::ReadLine UI made easy - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Term-UI - MetaCPAN" href="https://metacpan.org/dist/Term-UI/releases.rss" />
        <link rel="canonical" href="./Term::UI.html" />
        <meta name="description" content="Term::ReadLine UI made easy" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Term::UI" />
<meta name="twitter:title"       content="Term::UI" />
<meta name="twitter:description" content="Term::ReadLine UI made easy" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Term::UI.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Term-UI was released.">
      <span class="relatize">06 Aug 2021 16:55:59 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Term-UI">Term-UI</a>
  </li>
  <li>
    Module version: 0.50
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Term-UI/source/lib/Term/UI.pm">Source</a>
    (<a href="https://metacpan.org/dist/Term-UI/source/lib/Term/UI.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Term-UI/source/lib/Term">Browse</a>
    (<a href="https://metacpan.org/dist/Term-UI/source/lib/Term?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Term-UI/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Term-UI/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/jib/term-ui">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Term-UI">Issues</a>
      (6)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Term-UI+0.50" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Term-UI.html?oncpan=1&amp;distmat=1&amp;version=0.50&amp;grade=2" style="color: #090">1204</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Term-UI.html?oncpan=1&amp;distmat=1&amp;version=0.50&amp;grade=3" style="color: #900">4</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Term-UI.html?oncpan=1&amp;distmat=1&amp;version=0.50&amp;grade=4">0</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/BINGOS/Term-UI-0.50">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Term-UI who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Term-UI-0.50/index.html">22.29% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Term-UI/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Term-UI-0.50.tar.gz">
      Download (<span itemprop="fileSize">13.05KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FBINGOS%2FTerm-UI-0.50%2Flib%2FTerm%2FUI.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Term-UI/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Term-UI/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Term-UI">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Term-UI">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Term/UI.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="BINGOS/Term-UI-0.50"
>0.50
  (BINGOS on 2021-08-06)</option>
<option
  
  value="BINGOS/Term-UI-0.48"
>0.48
  (BINGOS on 2021-08-03)</option>
<option
  
  value="BINGOS/Term-UI-0.46"
>0.46
  (BINGOS on 2015-05-25)</option>
<option
  
  value="KANE/Term-UI-0.20"
>0.20
  (KANE on 2009-04-24)</option>
<option
  
  value="KANE/Term-UI-0.18"
>0.18
  (KANE on 2007-11-04)</option>
<option
  
  value="KANE/Term-UI-0.16"
>0.16
  (KANE on 2007-10-03)</option>
<option
  
  value="KANE/Term-UI-0.14"
>0.14
  (KANE on 2006-10-23)</option>
<option
  
  value="KANE/Term-UI-0.12"
>0.12
  (KANE on 2005-08-25)</option>
<option
  
  value="KANE/Term-UI-0.11"
>0.11
  (KANE on 2005-08-24)</option>
<option
  
  value="KANE/Term-UI-0.05"
>0.05
  (KANE on 2005-01-13)</option>
<option
  
  value="KANE/Term-UI-0.04"
>0.04
  (KANE on 2004-12-03)</option>
<option
  
  value="KANE/Term-UI-0.03"
>0.03
  (KANE on 2003-10-05)</option>
<option
  
  value="KANE/Term-UI-0.02"
>0.02
  (KANE on 2003-05-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="BINGOS/Term-UI-0.44"
>0.44
  (BINGOS on 2015-05-25)</option>
<option
  
  value="BINGOS/Term-UI-0.42"
>0.42
  (BINGOS on 2014-01-02)</option>
<option
  
  value="BINGOS/Term-UI-0.40"
>0.40
  (BINGOS on 2014-01-01)</option>
<option
  
  value="BINGOS/Term-UI-0.38"
>0.38
  (BINGOS on 2013-09-23)</option>
<option
  
  value="BINGOS/Term-UI-0.36"
>0.36
  (BINGOS on 2013-06-05)</option>
<option
  
  value="BINGOS/Term-UI-0.34"
>0.34
  (BINGOS on 2013-01-22)</option>
<option
  
  value="BINGOS/Term-UI-0.32"
>0.32
  (BINGOS on 2012-11-10)</option>
<option
  
  value="BINGOS/Term-UI-0.30"
>0.30
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.28"
>0.28
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.26"
>0.26
  (BINGOS on 2011-02-09)</option>
<option
  
  value="BINGOS/Term-UI-0.24"
>0.24
  (BINGOS on 2011-01-12)</option>
<option
  
  value="BINGOS/Term-UI-0.22"
>0.22
  (BINGOS on 2011-01-07)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/BINGOS/Term-UI-0.50/diff/' + encodeURIComponent(this.value) + '/lib/Term/UI.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="BINGOS/Term-UI-0.50"
>0.50
  (BINGOS on 2021-08-06)</option>
<option
  
  value="BINGOS/Term-UI-0.48"
>0.48
  (BINGOS on 2021-08-03)</option>
<option
  
  value="BINGOS/Term-UI-0.46"
>0.46
  (BINGOS on 2015-05-25)</option>
<option
  
  value="KANE/Term-UI-0.20"
>0.20
  (KANE on 2009-04-24)</option>
<option
  
  value="KANE/Term-UI-0.18"
>0.18
  (KANE on 2007-11-04)</option>
<option
  
  value="KANE/Term-UI-0.16"
>0.16
  (KANE on 2007-10-03)</option>
<option
  
  value="KANE/Term-UI-0.14"
>0.14
  (KANE on 2006-10-23)</option>
<option
  
  value="KANE/Term-UI-0.12"
>0.12
  (KANE on 2005-08-25)</option>
<option
  
  value="KANE/Term-UI-0.11"
>0.11
  (KANE on 2005-08-24)</option>
<option
  
  value="KANE/Term-UI-0.05"
>0.05
  (KANE on 2005-01-13)</option>
<option
  
  value="KANE/Term-UI-0.04"
>0.04
  (KANE on 2004-12-03)</option>
<option
  
  value="KANE/Term-UI-0.03"
>0.03
  (KANE on 2003-10-05)</option>
<option
  
  value="KANE/Term-UI-0.02"
>0.02
  (KANE on 2003-05-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="BINGOS/Term-UI-0.44"
>0.44
  (BINGOS on 2015-05-25)</option>
<option
  
  value="BINGOS/Term-UI-0.42"
>0.42
  (BINGOS on 2014-01-02)</option>
<option
  
  value="BINGOS/Term-UI-0.40"
>0.40
  (BINGOS on 2014-01-01)</option>
<option
  
  value="BINGOS/Term-UI-0.38"
>0.38
  (BINGOS on 2013-09-23)</option>
<option
  
  value="BINGOS/Term-UI-0.36"
>0.36
  (BINGOS on 2013-06-05)</option>
<option
  
  value="BINGOS/Term-UI-0.34"
>0.34
  (BINGOS on 2013-01-22)</option>
<option
  
  value="BINGOS/Term-UI-0.32"
>0.32
  (BINGOS on 2012-11-10)</option>
<option
  
  value="BINGOS/Term-UI-0.30"
>0.30
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.28"
>0.28
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.26"
>0.26
  (BINGOS on 2011-02-09)</option>
<option
  
  value="BINGOS/Term-UI-0.24"
>0.24
  (BINGOS on 2011-01-12)</option>
<option
  
  value="BINGOS/Term-UI-0.22"
>0.22
  (BINGOS on 2011-01-07)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Locale::Maketext::Simple" title="Locale::Maketext::Simple" class="ellipsis">Locale::Maketext::Simple</a></li>
  <li><a href="./Log::Message::Simple.html" title="Log::Message::Simple" class="ellipsis">Log::Message::Simple</a></li>
  <li><a href="https://metacpan.org/pod/Params::Check" title="Params::Check" class="ellipsis">Params::Check</a></li>
  <li><a href="https://metacpan.org/pod/Term::ReadLine" title="Term::ReadLine" class="ellipsis">Term::ReadLine</a></li>
  <li><a href="https://metacpan.org/pod/Test::More" title="Test::More" class="ellipsis">Test::More</a></li>
  <li><a href="https://metacpan.org/pod/if" title="if" class="ellipsis">if</a></li>
  <li><a href="https://metacpan.org/pod/parent" title="parent" class="ellipsis">parent</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Term::UI/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Term%3A%3AUI">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Term-UI">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/BINGOS/Term-UI-0.50/view/lib/Term/UI.pm">This version</a>
    </li>
    <li>
      <a href="./Term::UI.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/NOBUNAGA"><img src="https://www.gravatar.com/avatar/e772b59ce63734ea31a70ae3463607d1?d=identicon&amp;s=20" title="NOBUNAGA" alt="NOBUNAGA"></a>
<a class="display-all" href="https://metacpan.org/author/PWBENNETT"><img src="https://www.gravatar.com/avatar/41a085cce4a7061cf4ee49d02b9bed0e?d=identicon&amp;s=20" title="PWBENNETT" alt="PWBENNETT"></a>
<a class="display-all" href="https://metacpan.org/author/GETTY"><img src="https://www.gravatar.com/avatar/d374f794bb2f39232c29d0b376b9dcc4?d=identicon&amp;s=20" title="GETTY" alt="GETTY"></a>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Term-UI/plussers">4 PAUSE users</a>
</div>
<div>
    2 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
    >
      Jos Boumans &lt;kane[at]cpan.org&gt;
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/BINGOS" class="author-name">Chris Williams</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Term/UI.pm&#39;" class="">
<option
  selected
  value="BINGOS/Term-UI-0.50"
>0.50
  (BINGOS on 2021-08-06)</option>
<option
  
  value="BINGOS/Term-UI-0.48"
>0.48
  (BINGOS on 2021-08-03)</option>
<option
  
  value="BINGOS/Term-UI-0.46"
>0.46
  (BINGOS on 2015-05-25)</option>
<option
  
  value="KANE/Term-UI-0.20"
>0.20
  (KANE on 2009-04-24)</option>
<option
  
  value="KANE/Term-UI-0.18"
>0.18
  (KANE on 2007-11-04)</option>
<option
  
  value="KANE/Term-UI-0.16"
>0.16
  (KANE on 2007-10-03)</option>
<option
  
  value="KANE/Term-UI-0.14"
>0.14
  (KANE on 2006-10-23)</option>
<option
  
  value="KANE/Term-UI-0.12"
>0.12
  (KANE on 2005-08-25)</option>
<option
  
  value="KANE/Term-UI-0.11"
>0.11
  (KANE on 2005-08-24)</option>
<option
  
  value="KANE/Term-UI-0.05"
>0.05
  (KANE on 2005-01-13)</option>
<option
  
  value="KANE/Term-UI-0.04"
>0.04
  (KANE on 2004-12-03)</option>
<option
  
  value="KANE/Term-UI-0.03"
>0.03
  (KANE on 2003-10-05)</option>
<option
  
  value="KANE/Term-UI-0.02"
>0.02
  (KANE on 2003-05-10)</option>
<optgroup label="BackPAN">'
<option
  
  value="BINGOS/Term-UI-0.44"
>0.44
  (BINGOS on 2015-05-25)</option>
<option
  
  value="BINGOS/Term-UI-0.42"
>0.42
  (BINGOS on 2014-01-02)</option>
<option
  
  value="BINGOS/Term-UI-0.40"
>0.40
  (BINGOS on 2014-01-01)</option>
<option
  
  value="BINGOS/Term-UI-0.38"
>0.38
  (BINGOS on 2013-09-23)</option>
<option
  
  value="BINGOS/Term-UI-0.36"
>0.36
  (BINGOS on 2013-06-05)</option>
<option
  
  value="BINGOS/Term-UI-0.34"
>0.34
  (BINGOS on 2013-01-22)</option>
<option
  
  value="BINGOS/Term-UI-0.32"
>0.32
  (BINGOS on 2012-11-10)</option>
<option
  
  value="BINGOS/Term-UI-0.30"
>0.30
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.28"
>0.28
  (BINGOS on 2011-12-21)</option>
<option
  
  value="BINGOS/Term-UI-0.26"
>0.26
  (BINGOS on 2011-02-09)</option>
<option
  
  value="BINGOS/Term-UI-0.24"
>0.24
  (BINGOS on 2011-01-12)</option>
<option
  
  value="BINGOS/Term-UI-0.22"
>0.22
  (BINGOS on 2011-01-07)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Term-UI">Term-UI-0.50</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage three &#10;
          • 12 direct dependents &#10;          • 724 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Term-UI-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Term-UI-0.50">
    <input type="hidden" name="author" value="BINGOS">
    <input type="hidden" name="distribution" value="Term-UI">
    <button type="submit" class="favorite highlight"><span>6</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Term::UI.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>6</span> ++</a>
</div>
   / <span>Term::UI</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Term::UI.html#NAME">NAME</a></li>
  <li><a href="./Term::UI.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Term::UI.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Term::UI.html#HOW-IT-WORKS">HOW IT WORKS</a></li>
  <li><a href="./Term::UI.html#METHODS">METHODS</a>
    <ul>
      <li><a href="./Term::UI.html#$reply-=-$term-%3Eget_reply(-prompt-=%3E-&#39;question?&#39;,-%5Bchoices-=%3E-%5C@list,-default-=%3E-$list%5B0%5D,-preput-=%3E-%22text-to-put-as-default-user-input%22,-multi-=%3E-BOOL,-print_me-=%3E-%22extra-text-to-print-&amp;-record%22,-allow-=%3E-$ref%5D-);">$reply = $term-&gt;get_reply( prompt =&gt; &#39;question?&#39;, [choices =&gt; \@list, default =&gt; $list[0], preput =&gt; &quot;text to put as default user input&quot;, multi =&gt; BOOL, print_me =&gt; &quot;extra text to print &amp; record&quot;, allow =&gt; $ref] );</a></li>
      <li><a href="./Term::UI.html#$bool-=-$term-%3Eask_yn(-prompt-=%3E-%22your-question%22,-%5Bdefault-=%3E-(y%7C1,n%7C0),-print_me-=%3E-%22extra-text-to-print-&amp;-record%22%5D-)">$bool = $term-&gt;ask_yn( prompt =&gt; &quot;your question&quot;, [default =&gt; (y|1,n|0), print_me =&gt; &quot;extra text to print &amp; record&quot;] )</a></li>
      <li><a href="./Term::UI.html#($opts,-$munged)-=-$term-%3Eparse_options(-STRING-);">($opts, $munged) = $term-&gt;parse_options( STRING );</a></li>
      <li><a href="./Term::UI.html#$str-=-$term-%3Ehistory_as_string">$str = $term-&gt;history_as_string</a></li>
    </ul>
  </li>
  <li><a href="./Term::UI.html#GLOBAL-VARIABLES">GLOBAL VARIABLES</a>
    <ul>
      <li><a href="./Term::UI.html#$Term::UI::VERBOSE">$Term::UI::VERBOSE</a></li>
      <li><a href="./Term::UI.html#$Term::UI::AUTOREPLY">$Term::UI::AUTOREPLY</a></li>
      <li><a href="./Term::UI.html#$Term::UI::INVALID">$Term::UI::INVALID</a></li>
      <li><a href="./Term::UI.html#$Term::UI::History::HISTORY_FH">$Term::UI::History::HISTORY_FH</a></li>
    </ul>
  </li>
  <li><a href="./Term::UI.html#EXAMPLES">EXAMPLES</a>
    <ul>
      <li><a href="./Term::UI.html#Basic-get_reply-sample">Basic get_reply sample</a></li>
      <li><a href="./Term::UI.html#get_reply-with-choices">get_reply with choices</a></li>
      <li><a href="./Term::UI.html#get_reply-with-choices-and-default">get_reply with choices and default</a></li>
      <li><a href="./Term::UI.html#get_reply-using-print_me-&amp;-multi">get_reply using print_me &amp; multi</a></li>
      <li><a href="./Term::UI.html#get_reply-&amp;-allow">get_reply &amp; allow</a></li>
      <li><a href="./Term::UI.html#an-elaborate-ask_yn-sample">an elaborate ask_yn sample</a></li>
    </ul>
  </li>
  <li><a href="./Term::UI.html#See-Also">See Also</a></li>
  <li><a href="./Term::UI.html#BUG-REPORTS">BUG REPORTS</a></li>
  <li><a href="./Term::UI.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Term::UI.html#COPYRIGHT">COPYRIGHT</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Term::UI - Term::ReadLine UI made easy</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code>    use Term::UI;
    use Term::ReadLine;

    my $term = Term::ReadLine-&gt;new(&#39;brand&#39;);

    my $reply = $term-&gt;get_reply(
                    prompt =&gt; &#39;What is your favourite colour?&#39;,
                    choices =&gt; [qw|blue red green|],
                    default =&gt; &#39;blue&#39;,
    );

    my $bool = $term-&gt;ask_yn(
                        prompt =&gt; &#39;Do you like cookies?&#39;,
                        default =&gt; &#39;y&#39;,
                );


    my $string = q[some_command -option --no-foo --quux=&#39;this thing&#39;];

    my ($options,$munged_input) = $term-&gt;parse_options($string);


    ### don&#39;t have Term::UI issue warnings -- default is &#39;1&#39;
    $Term::UI::VERBOSE = 0;

    ### always pick the default (good for non-interactive terms)
    ### -- default is &#39;0&#39;
    $Term::UI::AUTOREPLY = 1;

    ### Retrieve the entire session as a printable string:
    $hist = Term::UI::History-&gt;history_as_string;
    $hist = $term-&gt;history_as_string;</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p><code>Term::UI</code> is a transparent way of eliminating the overhead of having to format a question and then validate the reply, informing the user if the answer was not proper and re-issuing the question.</p>

<p>Simply give it the question you want to ask, optionally with choices the user can pick from and a default and <code>Term::UI</code> will DWYM.</p>

<p>For asking a yes or no question, there&#39;s even a shortcut.</p>

<h1 id="HOW-IT-WORKS"><a id="HOW"></a>HOW IT WORKS</h1>

<p><code>Term::UI</code> places itself at the back of the <code>Term::ReadLine</code> <code>@ISA</code> array, so you can call its functions through your term object.</p>

<p><code>Term::UI</code> uses <code>Term::UI::History</code> to record all interactions with the commandline. You can retrieve this history, or alter the filehandle the interaction is printed to. See the <code>Term::UI::History</code> manpage or the <code>SYNOPSIS</code> for details.</p>

<h1 id="METHODS">METHODS</h1>

<h2 id="$reply-=-$term-&gt;get_reply(-prompt-=&gt;-&#39;question?&#39;,-[choices-=&gt;-\@list,-default-=&gt;-$list[0],-preput-=&gt;-&quot;text-to-put-as-default-user-input&quot;,-multi-=&gt;-BOOL,-print_me-=&gt;-&quot;extra-text-to-print-&amp;-record&quot;,-allow-=&gt;-$ref]-);"><a id="reply----term--get_reply--prompt----question---choices----list--default----list-0--preput----text-to-put-as-default-user-input--multi---BOOL--print_me----extra-text-to-print---record--allow----ref"></a>$reply = $term-&gt;get_reply( prompt =&gt; &#39;question?&#39;, [choices =&gt; \@list, default =&gt; $list[0], preput =&gt; &quot;text to put as default user input&quot;, multi =&gt; BOOL, print_me =&gt; &quot;extra text to print &amp; record&quot;, allow =&gt; $ref] );</h2>

<p><code>get_reply</code> asks a user a question, and then returns the reply to the caller. If the answer is invalid (more on that below), the question will be reposed, until a satisfactory answer has been entered.</p>

<p>You have the option of providing a list of choices the user can pick from using the <code>choices</code> argument. If the answer is not in the list of choices presented, the question will be reposed.</p>

<p>If you provide a <code>default</code> answer, this will be returned when either <code>$AUTOREPLY</code> is set to true, (see the <code>GLOBAL VARIABLES</code> section further below), or when the user just hits <code>enter</code>.</p>

<p>The <code>preput</code> argument allows to specify a text that will be inserted to the prompt line as the initial input which may be edited, deleted or accepted by the user. If you supply the empty string as the <code>preput</code> argument then the <code>default</code> value will be preputted. It will only work if the underlying readline module provide support for it (now it is supported only by the <code>Term::Readline::Gnu</code>).</p>

<p>You can indicate that the user is allowed to enter multiple answers by toggling the <code>multi</code> flag. Note that a list of answers will then be returned to you, rather than a simple string.</p>

<p>By specifying an <code>allow</code> handler, you can yourself validate the answer a user gives. This can be any of the types that the Params::Check <code>allow</code> function allows, so please refer to that manpage for details.</p>

<p>Finally, you have the option of adding a <code>print_me</code> argument, which is simply printed before the prompt. It&#39;s printed to the same file handle as the rest of the questions, so you can use this to keep track of a full session of Q&amp;A with the user, and retrieve it later using the <code>Term::UI-&gt;history_as_string</code> function.</p>

<p>See the <code>EXAMPLES</code> section for samples of how to use this function.</p>

<h2 id="$bool-=-$term-&gt;ask_yn(-prompt-=&gt;-&quot;your-question&quot;,-[default-=&gt;-(y|1,n|0),-print_me-=&gt;-&quot;extra-text-to-print-&amp;-record&quot;]-)"><a id="bool----term--ask_yn--prompt----your-question---default----y-1-n-0--print_me----extra-text-to-print---record"></a>$bool = $term-&gt;ask_yn( prompt =&gt; &quot;your question&quot;, [default =&gt; (y|1,n|0), print_me =&gt; &quot;extra text to print &amp; record&quot;] )</h2>

<p>Asks a simple <code>yes</code> or <code>no</code> question to the user, returning a boolean indicating <code>true</code> or <code>false</code> to the caller.</p>

<p>The <code>default</code> answer will automatically returned, if the user hits <code>enter</code> or if <code>$AUTOREPLY</code> is set to true. See the <code>GLOBAL VARIABLES</code> section further below.</p>

<p>Also, you have the option of adding a <code>print_me</code> argument, which is simply printed before the prompt. It&#39;s printed to the same file handle as the rest of the questions, so you can use this to keep track of a full session of Q&amp;A with the user, and retrieve it later using the <code>Term::UI-&gt;history_as_string</code> function.</p>

<p>See the <code>EXAMPLES</code> section for samples of how to use this function.</p>

<h2 id="($opts,-$munged)-=-$term-&gt;parse_options(-STRING-);"><a id="opts---munged-----term--parse_options--STRING"></a>($opts, $munged) = $term-&gt;parse_options( STRING );</h2>

<p><code>parse_options</code> will convert all options given from an input string to a hash reference. If called in list context it will also return the part of the input string that it found no options in.</p>

<p>Consider this example:</p>

<pre><code>    my $str =   q[command --no-foo --baz --bar=0 --quux=bleh ] .
                q[--option=&quot;some&#39;thing&quot; -one-dash -single=blah&#39; arg];

    my ($options,$munged) =  $term-&gt;parse_options($str);

    ### $options would contain: ###
    $options = {
                &#39;foo&#39;       =&gt; 0,
                &#39;bar&#39;       =&gt; 0,
                &#39;one-dash&#39;  =&gt; 1,
                &#39;baz&#39;       =&gt; 1,
                &#39;quux&#39;      =&gt; &#39;bleh&#39;,
                &#39;single&#39;    =&gt; &#39;blah\&#39;&#39;,
                &#39;option&#39;    =&gt; &#39;some\&#39;thing&#39;
    };

    ### and this is the munged version of the input string,
    ### ie what&#39;s left of the input minus the options
    $munged = &#39;command arg&#39;;</code></pre>

<p>As you can see, you can either use a single or a double <code>-</code> to indicate an option. If you prefix an option with <code>no-</code> and do not give it a value, it will be set to 0. If it has no prefix and no value, it will be set to 1. Otherwise, it will be set to its value. Note also that it can deal fine with single/double quoting issues.</p>

<h2 id="$str-=-$term-&gt;history_as_string"><a id="str----term--history_as_string"></a>$str = $term-&gt;history_as_string</h2>

<p>Convenience wrapper around <code>Term::UI::History-&gt;history_as_string</code>.</p>

<p>Consult the <code>Term::UI::History</code> man page for details.</p>

<h1 id="GLOBAL-VARIABLES"><a id="GLOBAL"></a>GLOBAL VARIABLES</h1>

<p>The behaviour of Term::UI can be altered by changing the following global variables:</p>

<h2 id="$Term::UI::VERBOSE"><a id="Term::UI::VERBOSE"></a>$Term::UI::VERBOSE</h2>

<p>This controls whether Term::UI will issue warnings and explanations as to why certain things may have failed. If you set it to 0, Term::UI will not output any warnings. The default is 1;</p>

<h2 id="$Term::UI::AUTOREPLY"><a id="Term::UI::AUTOREPLY"></a>$Term::UI::AUTOREPLY</h2>

<p>This will make every question be answered by the default, and warn if there was no default provided. This is particularly useful if your program is run in non-interactive mode. The default is 0;</p>

<h2 id="$Term::UI::INVALID"><a id="Term::UI::INVALID"></a>$Term::UI::INVALID</h2>

<p>This holds the string that will be printed when the user makes an invalid choice. You can override this string from your program if you, for example, wish to do localization. The default is <code>Invalid selection, please try again: </code></p>

<h2 id="$Term::UI::History::HISTORY_FH"><a id="Term::UI::History::HISTORY_FH"></a>$Term::UI::History::HISTORY_FH</h2>

<p>This is the filehandle all the print statements from this module are being sent to. Please consult the <code>Term::UI::History</code> manpage for details.</p>

<p>This defaults to <code>*STDOUT</code>.</p>

<h1 id="EXAMPLES">EXAMPLES</h1>

<h2 id="Basic-get_reply-sample"><a id="Basic"></a>Basic get_reply sample</h2>

<pre><code>    ### ask a user (with an open question) for their favourite colour
    $reply = $term-&gt;get_reply( prompt =&gt; &#39;Your favourite colour? );</code></pre>

<p>which would look like:</p>

<pre><code>    Your favourite colour?</code></pre>

<p>and <code>$reply</code> would hold the text the user typed.</p>

<h2 id="get_reply-with-choices"><a id="get_reply"></a>get_reply with choices</h2>

<pre><code>    ### now provide a list of choices, so the user has to pick one
    $reply = $term-&gt;get_reply(
                prompt  =&gt; &#39;Your favourite colour?&#39;,
                choices =&gt; [qw|red green blue|] );</code></pre>

<p>which would look like:</p>

<pre><code>      1&gt; red
      2&gt; green
      3&gt; blue

    Your favourite colour?</code></pre>

<p><code>$reply</code> will hold one of the choices presented. <code>Term::UI</code> will repose the question if the user attempts to enter an answer that&#39;s not in the list of choices. The string presented is held in the <code>$Term::UI::INVALID</code> variable (see the <code>GLOBAL VARIABLES</code> section for details.</p>

<h2 id="get_reply-with-choices-and-default"><a id="get_reply1"></a>get_reply with choices and default</h2>

<pre><code>    ### provide a sensible default option -- everyone loves blue!
    $reply = $term-&gt;get_reply(
                prompt  =&gt; &#39;Your favourite colour?&#39;,
                choices =&gt; [qw|red green blue|],
                default =&gt; &#39;blue&#39; );</code></pre>

<p>which would look like:</p>

<pre><code>      1&gt; red
      2&gt; green
      3&gt; blue

    Your favourite colour? [3]:</code></pre>

<p>Note the default answer after the prompt. A user can now just hit <code>enter</code> (or set <code>$Term::UI::AUTOREPLY</code> -- see the <code>GLOBAL VARIABLES</code> section) and the sensible answer &#39;blue&#39; will be returned.</p>

<h2 id="get_reply-using-print_me-&amp;-multi"><a id="get_reply2"></a><a id="get_reply-using-print_me---multi"></a>get_reply using print_me &amp; multi</h2>

<pre><code>    ### allow the user to pick more than one colour and add an
    ### introduction text
    @reply = $term-&gt;get_reply(
                print_me    =&gt; &#39;Tell us what colours you like&#39;,
                prompt      =&gt; &#39;Your favourite colours?&#39;,
                choices     =&gt; [qw|red green blue|],
                multi       =&gt; 1 );</code></pre>

<p>which would look like:</p>

<pre><code>    Tell us what colours you like
      1&gt; red
      2&gt; green
      3&gt; blue

    Your favourite colours?</code></pre>

<p>An answer of <code>3 2 1</code> would fill <code>@reply</code> with <code>blue green red</code></p>

<h2 id="get_reply-&amp;-allow"><a id="get_reply3"></a><a id="get_reply---allow"></a>get_reply &amp; allow</h2>

<pre><code>    ### pose an open question, but do a custom verification on
    ### the answer, which will only exit the question loop, if
    ### the answer matches the allow handler.
    $reply = $term-&gt;get_reply(
                prompt  =&gt; &quot;What is the magic number?&quot;,
                allow   =&gt; 42 );</code></pre>

<p>Unless the user now enters <code>42</code>, the question will be reposed over and over again. You can use more sophisticated <code>allow</code> handlers (even subroutines can be used). The <code>allow</code> handler is implemented using <code>Params::Check</code>&#39;s <code>allow</code> function. Check its manpage for details.</p>

<h2 id="an-elaborate-ask_yn-sample"><a id="an"></a>an elaborate ask_yn sample</h2>

<pre><code>    ### ask a user if he likes cookies. Default to a sensible &#39;yes&#39;
    ### and inform him first what cookies are.
    $bool = $term-&gt;ask_yn( prompt   =&gt; &#39;Do you like cookies?&#39;,
                           default  =&gt; &#39;y&#39;,
                           print_me =&gt; &#39;Cookies are LOVELY!!!&#39; );</code></pre>

<p>would print:</p>

<pre><code>    Cookies are LOVELY!!!
    Do you like cookies? [Y/n]:</code></pre>

<p>If a user then simply hits <code>enter</code>, agreeing with the default, <code>$bool</code> would be set to <code>true</code>. (Simply hitting &#39;y&#39; would also return <code>true</code>. Hitting &#39;n&#39; would return <code>false</code>)</p>

<p>We could later retrieve this interaction by printing out the Q&amp;A history as follows:</p>

<pre><code>    print $term-&gt;history_as_string;</code></pre>

<p>which would then print:</p>

<pre><code>    Cookies are LOVELY!!!
    Do you like cookies? [Y/n]:  y</code></pre>

<p>There&#39;s a chance we&#39;re doing this non-interactively, because a console is missing, the user indicated he just wanted the defaults, etc.</p>

<p>In this case, simply setting <code>$Term::UI::AUTOREPLY</code> to true, will return from every question with the default answer set for the question. Do note that if <code>AUTOREPLY</code> is true, and no default is set, <code>Term::UI</code> will warn about this and return <code>undef</code>.</p>

<h1 id="See-Also"><a id="See"></a>See Also</h1>

<p><code>Params::Check</code>, <code>Term::ReadLine</code>, <code>Term::UI::History</code></p>

<h1 id="BUG-REPORTS"><a id="BUG"></a>BUG REPORTS</h1>

<p>Please report bugs or other issues to &lt;bug-term-ui@rt.cpan.org&lt;gt&gt;.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>This module by Jos Boumans &lt;kane@cpan.org&gt;.</p>

<h1 id="COPYRIGHT">COPYRIGHT</h1>

<p>This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Term::UI, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Term::UI</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Term::UI</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Term::UI.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
